package com.ddstation.crm.login.service;

import java.util.List;
import java.util.Map;

import com.ddstation.crm.institution.entity.DtHealthManageInstitutionDoctorEntity;
import com.ddstation.crm.institution.model.UserAccountModel;

/**
 * 账户管理服务
 * @author zhangdifeng
 * @date 2017年8月23日
 */
public interface LoginAccountService {
	/**
	 * 获取登录账号信息
	 * @param loginUser
	 * @return
	 */
	public DtHealthManageInstitutionDoctorEntity get(String loginUser);
	
	/**
	 * 开通试用
	 * @param institutionName
	 * @param name
	 * @param phone
	 * @param accountType
	 * @param loginUser
	 * @return
	 */
	public String newAccount(String institutionName, Integer type, String businessLicenceCd, String name, String phone, int accountType, String loginUser, String password);

	/**
	 * 开通试用(小程序)
	 * @param institutionName
	 * @param name
	 * @param phone
	 * @param accountType
	 * @param loginUser
	 * @param district
	 * @param address
	 * @return
	 */
	public Map<String,Object> newAccount(String institutionName, Integer type, String businessLicenceCd, String name, String phone, int accountType, String loginUser, String password, String district, String address);
	
	/**
	 * 添加帐号
	 * @param institutionId
	 * @param name
	 * @param phone
	 * @param authType
	 * @param loginUser
	 * @param loginPassword
	 * @return
	 */
	public int add(
			String institutionId, String name, String phone, String infoImg,
			String loginUser, String loginPassword,
			Integer orgId, Integer isManager,
			List<Integer> menuIdList);

	/**
	 * 修改
	 * @param institutionId
	 * @param name
	 * @param phone
	 * @param authType
	 * @return
	 */
	public int replace(
			String institutionId, String doctorId, String name, String phone, String infoImg,
			String loginUser, String loginPassword,
			Integer orgId, Integer isManager,
			List<Integer> menuIdList);
	
	/**
	 * 删除
	 * @param institutionId
	 * @param id
	 * @return
	 */
	public int remove(String institutionId, String doctorId);
	
	/**
	 * 确认用户名是否存在
	 * @param userName
	 * @return
	 */
	public Integer checkUserName(String userName);

	public List<UserAccountModel> getAllAccount(String id);
	public List<Map<String, Object>> getRemainderAccountType(String id);
//	public void addInstitutionAndSendMail(String company, Integer type, String businessLicenceCd, String name, String phone, int i, String loginUser);
}
